"""取消待支付的订单"""
import allure
from page.cancel_an_order_page.cancel_an_order_dict import get_mall_xpath
from base.WebKeys import WebKeys

class MallFlow_cancel_an_order(WebKeys):

    def xl_Cancel_an_order(self):
        """取消已经提交的订单"""
        with allure.step("进入我的订单"):
            self.wait_click(get_mall_xpath('My_order'))

        with allure.step("切换到批采订单"):
            self.wait_click(get_mall_xpath('Batch_production'))

        with allure.step("取消订单"):
            self.wait_click(get_mall_xpath('Cancel_an_order'))

        with allure.step("确认取消"):
            self.wait_click(get_mall_xpath('verify'))



